<input type="hidden" name="action" value="editor" />
<input type="hidden" name="item" value="<?php echo $item['id']; ?>" />
<fieldset>
	<dl>
		<dt>&nbsp;</dt>
		<dd><input type="submit" value="Save" style="padding-left:20px; padding-right:10px;  background-image: url('../images/system/save.gif'); border:1px solid #DDDDDD; height:20px;" class="buttons">
		</dd>
	</dl>
	<dl>
		<dt>Component ID:</dt>
		<dd>
			<input name="com_id" maxlength="3" type="text" value="<?php echo $item['com_id']; ?>" style="width:30%">
			&nbsp;<?php echo $error['com_id']; ?>
		</dd>
	</dl>
	<dl>
		<dt>Name Left:</dt>
		<dd>
			<input name="name_l" type="text" value="<?php echo $item['name_l']; ?>" style="width:30%">
			&nbsp;<?php echo $error['name_l']; ?>
		</dd>
	</dl>
	<dl>
		<dt>Name Right:</dt>
		<dd>
			<input name="name_r" type="text" value="<?php echo $item['name_r']; ?>" style="width:30%">
			&nbsp;<?php echo $error['name_r']; ?>
		</dd>
	</dl>
	<dl>
		<dt>Component Sets:</dt>
		<dd>
			<select name="set_id" style="width:30%;">
				<?php 
				if($modcomsets)
				{
					foreach($modcomsets as $set)
					{
						if($set['id'] == $item['set_id'])
						{ echo '<option value="'.$set['id'].'" selected>'.$set['title'].'</option>'; }
						else
						{ echo '<option value="'.$set['id'].'">'.$set['title'].'</option>'; }
					}
				}
				?>
			</select>
		</dd>
	</dl>
	<dl>
		<dt>Path:</dt>
		<dd>
			<input name="path" type="text" value="<?php echo $item['path']; ?>" style="width:30%">
			&nbsp;<?php echo $error['path']; ?>
		</dd>
	</dl>
	<dl>
		<dt>Hfb Composition Template Set:</dt>
		<dd>
			<select name="hfb_set" style="width:30%" onChange="submit();"  <?php if(!($item['site_id'] > 0)){ echo 'disabled="true"'; } ?>>
				<option value="0" selected>Site Default</option>
				<?php 
					if($item['site_id'] > 0)
					{
						$hfbsets = getHFBSetList();
						if($hfbsets)
						{
							foreach($hfbsets as $hfbset)
							{
								if ($hfbset['id'] == $item['hfb_set'])
								{
									echo '<option value="'.$hfbset['id'].'" selected="selected">'.$hfbset['name'].'</option>';
								}
								else
								{
									echo '<option value="'.$hfbset['id'].'">'.$hfbset['name'].'</option>';
								}
							}
						}
					}
				?>
			</select>
		</dd>
	</dl>
	<dl>
		<dt>Site Theme:</dt>
		<dd>
			<select name="theme_id" style="width:30%" onChange="submit();" <?php if(!($item['site_id'] > 0)){ echo 'disabled="true"'; } ?>>
				<option value="0" selected>Site Default</option>
				<?php 
					if($item['site_id'] > 0)
					{
						$hfbsets = getHFBSetList();
						if($hfbsets)
						{
							foreach($hfbsets as $hfbset)
							{
								if ($hfbset['id'] == $item['hfb_set'])
								{
									echo '<option value="'.$hfbset['id'].'" selected="selected">'.$hfbset['name'].'</option>';
								}
								else
								{
									echo '<option value="'.$hfbset['id'].'">'.$hfbset['name'].'</option>';
								}
							}
						}
					}
				?>
			</select>
		</dd>
	</dl>
	<dl>
		<dt>Icon:</dt>
		<dd>
			<select name="icon" style="width:30%" onChange="document.edit_form.submit()">
				<option value="0" selected>-None-</option>
				<?php 
					if($_REQUEST['icon_set'] > 0)
					{
						$item['icon_set_id'] = $_REQUEST['icon_set'];
					}
					$result = mysql_query("SELECT * FROM ".DB_PERFIX."icons WHERE set_id=".$item['icon_set_id'].";");
					while($row = mysql_fetch_array($result))
					{
						if ($row['id'] == $item['icon'])
						{
							echo '<option value="'.$row['id'].'" selected>'.$row['name'].'</option>';
						}
						else
						{
							echo '<option value="'.$row['id'].'">'.$row['name'].'</option>';
						}
					}
				?>
			</select>
		</dd>
	</dl>
</fieldset>
</form>